#if !defined(AFX_SHOWDATA_H__AE3FB23C_0D4B_4E0F_851E_BF872DC18D2C__INCLUDED_)
#define AFX_SHOWDATA_H__AE3FB23C_0D4B_4E0F_851E_BF872DC18D2C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ShowData.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CShowData window
#include <list>
#include <iterator>

class CShowData: public CStatic  
{
public:
	CShowData();
	virtual ~CShowData();
public:
	void UpdateCurve2();
	void SetChannalNumber(int channalnumber);
	void AddValue(double dTime,double dValue1,double dValue2,double dValue3,double dValue4);
	void AddValue(double dTime,double dValue1,double dValue2,double dValue3);
	void AddValue(double dTime,double dValue1,double dValue2);
	void AddValue(double dTime,double dValue);
	void Clear();
	void UpdateCurve();
	void SetDimT(double newDimT);
	void SetDimy(double newDimY);
	void SetBase(int nNewABase,int nRange);
	void SetXAxisZeroPoint(CString StartOfXAxis);
	void SetCenterOfYAxis(CString CenterOfYAxis);
    void SetXAxisGridNuber(CString XAxisGridNuber);
	void SetYAxisGridNuber(CString YAxisGridNuber);
	void SetDefault();
private: 
	int ConvertTimeToAxisX(double dTime);
	int ConvertValueToAxisY(double dValue);
	void DrawCurvePanel(CDC *pDC);
	void DrawGrid(CDC *pDC);
	void DrawCurve(CDC *pDC);
	void DrawAxis(CDC *pDC);
//	void DrawTrack(CDC *pDC,BOOL bPressed);
	void DrawArrow(CDC *pDC,int nIndex,BOOL bLighted);

	
private:
	
	
	CRect	m_rectCurve;
	CRect	m_rectValue;
	CRect   m_rectCurvePanel;
	CRect   m_rectButtonPanel;
	CRect   m_rectScroll;
	
	CRgn	m_rgnCurve;
	CRgn	m_rgnYPlus;
	CRgn	m_rgnYMinus;
	CRgn	m_rgnTPlus;
	CRgn	m_rgnTMinus;
    
	
	
	CBrush  m_BkBrush;
	CBrush  m_PanelBrush;
	CBrush  m_CurveBrush;
	
	CBrush m_ButtonPanelBrush;
	
	CPen    m_PenCurve1;
    CPen    m_PenCurve2;
	CPen    m_PenCurve3;
	CPen    m_PenCurve4;
	
	CPen    m_PenGrid;
	CPen    m_PenMiddleGrid;
	CPen    m_PenBrightLine;
	CPen    m_PenDarkLine;

	CFont   m_FontAxis;
	
	   
	double  m_dDimT;
	double  m_dDimY;
	double  m_dValue;
	
	int		m_nBase;
	int		m_nRange;
	int     m_nArrowIndex;
	
	BOOL    m_bPressed;
	BOOL	m_bDrawing;
	
	CBitmap m_bitmapTitle;
	CBitmap m_bitmapTrack;
	
	std::list<double> m_TimeList;
	std::list<double> m_ValueList1;
    std::list<double> m_ValueList2;
	std::list<double> m_ValueList3;
	std::list<double> m_ValueList4;
	
	int numberofYgrid;
	int numberofXgrid;
	CString centervalueofYAxis;
    CString centervalueofXAxis;
    CString startvalueofXAxis;
	
    POINT PointLeftTop;
	POINT posLast;
	POINT posDown; 

    BOOL PointDown;
	int ShowChannel;
	BOOL OnOffChannel1;
	BOOL OnOffChannel2;
	BOOL OnOffChannel3;
	BOOL OnOffChannel4;
	
	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CShowData)
protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL
	
	// Implementation
protected:
	
	//{{AFX_MSG(CShowData)
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnPaint();
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg UINT OnNcHitTest(CPoint point);
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG
	
	DECLARE_MESSAGE_MAP()
		
		
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SHOWDATA_H__AE3FB23C_0D4B_4E0F_851E_BF872DC18D2C__INCLUDED_)
